package com.acdc.dlt698.entity;

import com.acdc.dlt698.constants.AttrNum;
import com.acdc.dlt698.constants.DataType;
import com.acdc.dlt698.constants.GetResultType;
import com.acdc.dlt698.constants.OI;
import lombok.Data;

/**
 * 帧OAD信息
 */
@Data
public class OAD {
    private OI oi;
    private AttrNum attrNum;
    private byte attributeIndex;
    private byte[] data;
    // 返回值的数据类型
    private DataType dataType;
    // 返回值的字节长度
    private int length;
    // 结果类型的映射值
    private GetResultType getResultType;

    public OAD() {
        this.attributeIndex = 0x00;
    }

    public OAD(OI oi, AttrNum attrNum) {
        this.oi = oi;
        this.attrNum = attrNum;
        this.attributeIndex = 0x00;
    }

    public OAD(OI oi, AttrNum attrNum, byte attributeIndex) {
        this.oi = oi;
        this.attrNum = attrNum;
        this.attributeIndex = attributeIndex;
    }
}
